#include <bits/stdc++.h>

int main() {
	std::mt19937 rnd(std::chrono::steady_clock::now().time_since_epoch().count());
	int n, l; std::cin >> n, l = 1e6;
	std::cout << n << " " << l << "\n";
	std::vector<int> a(n);
	for(int i = 0; i < n; ++i) a[i] = i + 1;
	std::shuffle(a.begin(), a.end(), rnd);
	for(int x : a) std::cout << x << " "; std::cout << "\n";
	return 0;
}
